Fake timestamp when making track from wpt in cvt filter.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 10 Jan 2006 21:17:15 +0000 (21:17 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 10 Jan 2006 21:17:15 +0000 (21:17 +0000)
gpsbabel/cvttypes.c

index b17cf739521e3edfba0bb0ee8859588faaa85aaf..a61cec634953b436f9f272d9891e7a6a4fdaed87 100644 (file)
@@ -27,6 +27,7 @@
 
 static char *action;
 static route_head *my_trk_head;
+time_t tmstart;
 
 static
 arglist_t cvttype_skeleton_args[] = {
@@ -35,6 +36,7 @@ arglist_t cvttype_skeleton_args[] = {
        {0, 0, 0, 0, 0}
 };
 
+
 static void
 cvttype_skeleton_init(const char *args)        
 {
@@ -54,6 +56,10 @@ cvttype_skeleton_process(void)
 
 // if action == to trk
                waypt_del(wpt);
+               /* If no timestamp, fake one. */
+               if (wpt->creation_time <= 0) { 
+                       wpt->creation_time  = ++tmstart; 
+               }
                route_add_wpt(my_trk_head, wpt);
 // if action == to rte
 //             waypt_del(wpt);